<?php exit;?>{* Template Name:公共头部 *}
<!doctype html>
<html>
<head>
	<meta charset="utf-8">
	<meta name="renderer" content="webkit">
	<meta http-equiv="X-UA-Compatible" content="IE=edge,chrome=1">
	<meta http-equiv="Cache-Control" content="no-transform"/> 
	<meta http-equiv="Cache-Control" content="no-siteapp"/>
	<meta name="viewport" content="width=device-width,minimum-scale=1,initial-scale=1">
	{php}
    if($zbp->Config('San_Rabbit')->seo=="1"){
        if($zbp->Config('San_Rabbit')->separator){
            $separator = $zbp->Config('San_Rabbit')->separator;
        }else{
            $separator = ' | ';
        }
        $separatornav = ' - ';
        if($type =='index'){
            if($page == '1'){
                if($zbp->Config('San_Rabbit')->h_title){
                    $dftitle = $zbp->Config('San_Rabbit')->h_title;
                }else{
                    $dftitle = $zbp->name.$separator.$zbp->subname;
                }
            }else{
                if($zbp->Config('San_Rabbit')->h_title){
                    $dftitle = $zbp->Config('San_Rabbit')->h_title.$separatornav.'第' .$page. '页';
                }else{
                    $dftitle = $zbp->name.$separator.$zbp->subname.$separatornav.'第'.$page.'页';
                }
            }
            $keywords = $zbp->Config('San_Rabbit')->Keywords;
            $description = $zbp->Config('San_Rabbit')->Description;
        }
        elseif($type == 'category'){
            if ($page=='1') {
                $dftitle = $category->Name.$separator.$zbp->name;
            } else {
                $dftitle = $category->Name.$separatornav.'第'.$page.'页'.$separator.$zbp->name;
            }
            $keywords = $category->Name;
            $description = $category->Intro;
        }
        elseif($type == 'article'){
            $dftitle = $article->Title.$separator.$zbp->name;
            $aryTags = array();
            foreach($article->Tags as $key){
                $aryTags[] = $key->Name;
            }
            $keywords = implode(',',$aryTags);
            $description = preg_replace('/[\r\n\s]+/', ' ', trim(SubStrUTF8(TransferHTML($article->Content,'[nohtml]'),135)).'...');
        }
        elseif($type == 'page'){
            $dftitle = $article->Title.$separator.$zbp->name;
            $keywords = $article->Title;
            $description = preg_replace('/[\r\n\s]+/', ' ', trim(SubStrUTF8(TransferHTML($article->Content,'[nohtml]'),135)).'...');
        }
        else {
            $dftitle = $zbp->title.$separator.$zbp->name;
            $keywords = $zbp->Config('San_Rabbit')->Keywords;
            $description = $zbp->Config('San_Rabbit')->Description;
        }
{/php}
    <title>{$dftitle}</title>
    <meta name="keywords" content="{$keywords}" />
    <meta name="description" content="{$description}" />
{php}
    }else{
{/php}
<title>{$name}-{$title}</title>
{php}
    }
{/php}
	<link rel="stylesheet" type="text/css" href="{$host}zb_users/theme/{$theme}/style/style.css" />
	<link rel="stylesheet" type="text/css" href="{$host}zb_users/theme/{$theme}/style/css/swiper.min.css" />
	<link rel="stylesheet" type="text/css" href="{$host}zb_users/theme/{$theme}/style/iconfont/iconfont.css" />
	<script src="{$host}zb_system/script/jquery-2.2.4.min.js" type="text/javascript"></script>
  	<script src="{$host}zb_system/script/zblogphp.js" type="text/javascript"></script>
	<script src="{$host}zb_system/script/c_html_js_add.php" type="text/javascript"></script>
	<script src="{$host}zb_users/theme/{$theme}/style/js/com.js"></script>
	<script src="{$host}zb_users/theme/{$theme}/style/js/swiper.min.js" type="text/javascript"></script>
	{php}
		if($zbp->Config('San_Rabbit')->waplogo){
			$waplogo = $zbp->Config('San_Rabbit')->waplogo;
		}else{
			$waplogo = $host."zb_users/theme/".$theme."/style/images/mlogo.png";
		}
	{/php}
	{if $zbp->Config('San_Rabbit')->color}
		<style>
		.selected a:after {background-color: {$zbp->Config('San_Rabbit')->color};}
		.widget h5{border-bottom: 3px {$zbp->Config('San_Rabbit')->color} solid;}
		.widget hr{border-bottom: 1px {$zbp->Config('San_Rabbit')->color} solid;}
		.main_body .info .tags a:first-child{color: {$zbp->Config('San_Rabbit')->color};}
		.article_related .tit h5{border-bottom: 3px {$zbp->Config('San_Rabbit')->color} solid;}
		.article_related .tit hr{border-bottom: 1px {$zbp->Config('San_Rabbit')->color} solid;}
		.related_body li::before{background-color: {$zbp->Config('San_Rabbit')->color};}
		.blogs_list:hover h2 {color: {$zbp->Config('San_Rabbit')->color};}
		.blogs_list h2 em.isTop, .post_picture h2 em.isTop {background: {$zbp->Config('San_Rabbit')->color};}		
		.pagination ul>.active>a, .pagination ul>.active>span {background-color: {$zbp->Config('San_Rabbit')->color};}		
		.blogs_tags a:hover { background: {$zbp->Config('San_Rabbit')->color}; }		
		.divComments li .comment-refer .icon-yinhao {color: {$zbp->Config('San_Rabbit')->color};}		
		.divSearchPanel input[type=submit] {border: 2px solid {$zbp->Config('San_Rabbit')->color};background: {$zbp->Config('San_Rabbit')->color};}		
		#starlist li:hover a, #starlist ul.sub li a:hover { color: {$zbp->Config('San_Rabbit')->color}; }		
		.wz_tuijian p {background: {$zbp->Config('San_Rabbit')->color};}	
		#cancel-reply {color: {$zbp->Config('San_Rabbit')->color};border: 2px solid {$zbp->Config('San_Rabbit')->color};}
		#cancel-reply::before {color: {$zbp->Config('San_Rabbit')->color};}
		.cmtarea textarea:focus {color: #333333;}
		.cmtsubmit button:hover {color: {$zbp->Config('San_Rabbit')->color};border-color:{$zbp->Config('San_Rabbit')->color}}
		.cmtsubmit button:hover::before {color: {$zbp->Config('San_Rabbit')->color}}
		.cmtsubmit button:active {border-color: {$zbp->Config('San_Rabbit')->color};}
		.cmtform input:focus {color:{$zbp->Config('San_Rabbit')->color};border-color: {$zbp->Config('San_Rabbit')->color};}
		.backtop .bt-box {background: {$zbp->Config('San_Rabbit')->color};}
		@media only screen and (max-width: 959px) {.top {background: url({$waplogo}) no-repeat #1d273d 10px;background-size: 100px;}}
		</style>
	{/if}
	{if $zbp->Config('San_Rabbit')->s_nav_to}
        <style>
        @media screen and (min-width: 959px){
            header {position: fixed;top: 0;left: 0;z-index: 9999;height: 40px;width: 100%;}
            main {margin: 150px auto 0;}
			.following2 {top: 145px;}
        }
        </style>
    {/if}
{$header}
{if $type=='index'&&$page=='1'}
	<link rel="alternate" type="application/rss+xml" href="{$feedurl}" title="{$name}" />
	<link rel="EditURI" type="application/rsd+xml" title="RSD" href="{$host}zb_system/xml-rpc/?rsd" />
	<link rel="wlwmanifest" type="application/wlwmanifest+xml" href="{$host}zb_system/xml-rpc/wlwmanifest.xml" />
{/if}
</head>
